#include<iostream>
#include<cstring>
#include<queue>

using namespace std;

struct node {
    int x, y, d;
};

const int N = 25;
int m, n, k;
char maze[N][N];
int cnt;
int v[N][N];
int flag;
int ans, res;
int dx[] = {0, 0, 1, -1};
int dy[] = {1, -1, 0, 0};

bool bfs() {
    queue<node> q;
    q.push({0, 0, 0});

    while (q.size()) {
        auto t = q.front();
        q.pop();

        int x = t.x, y = t.y, d = t.d;
        for (int i = 0; i < 4; ++i) {
            int nx = x + dx[i], ny = y + dy[i];
            if ( nx < 0 || nx >= n || ny < 0 || ny >= m ) continue;
            if ( v[nx][ny] );
        }
    }
}

void dfs(int x, int y, int d, int ans) {
    if ( d > k ) return;
    if ( ans == cnt ) {
        res = min(d, res);
        return;
    }

    for (int i = 0; i < 4; ++i) {
        int nx = x + dx[i], ny = y + dy[i];
        if ( nx < 0 || nx >= n || ny < 0 || ny >= m ) continue;
        //if(v[nx][ny]) continue;
        if ( maze[nx][ny] == 't' ) continue;
        //v[nx][ny] = 1;
        bool tran = 0;
        if ( maze[nx][ny] == 'r' ) {
            tran = 1;
            ++ans;
            maze[nx][ny] = 't';
        }
        dfs(nx, ny, d + 1, ans);
        if ( tran == 1 ) {
            --ans;
            maze[nx][ny] = 'r';
        }
        //v[nx][ny] = 0;
    }
}

int main() {
    cin >> m >> n >> k;
    while (m != 0 || n != 0 || k != 0) {
        memset(v, 0, sizeof(v));
        cnt = 0;
        flag = 0;
        ans = 0;
        res = 1e9;
        for (int i = 0; i < m; ++i) {
            for (int j = 0; j < n; ++j) {
                cin >> maze[i][j];
                if ( maze[i][j] == 'r' ) ++cnt;
            }
        }
        v[0][0] = 1;
        dfs(0, 0, 0, 0);
        //	cout << " res = " << res << endl;
        if ( res <= k ) cout << "Poor Johnny,he will never get GJ." << endl;
        else cout << "Poor Cydornia,he will never get GJ." << endl;
        cin >> m >> n >> k;
    }
    return 0;
} 